package com.kkb.pojo;

import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

public class TbSysuserRole implements GrantedAuthority, Serializable {
    private Integer sysuserRoleId;

    private Integer roleId;

    private Integer sysuserId;

    private static final long serialVersionUID = 1L;

    public TbSysuserRole(Integer sysuserRoleId, Integer roleId, Integer sysuserId) {
        this.sysuserRoleId = sysuserRoleId;
        this.roleId = roleId;
        this.sysuserId = sysuserId;
    }

    public TbSysuserRole() {
        super();
    }

    public Integer getSysuserRoleId() {
        return sysuserRoleId;
    }

    public void setSysuserRoleId(Integer sysuserRoleId) {
        this.sysuserRoleId = sysuserRoleId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getSysuserId() {
        return sysuserId;
    }

    public void setSysuserId(Integer sysuserId) {
        this.sysuserId = sysuserId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sysuserRoleId=").append(sysuserRoleId);
        sb.append(", roleId=").append(roleId);
        sb.append(", sysuserId=").append(sysuserId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public String getAuthority() {
        return sysuserId+"";
    }
}